<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="application/javascript">
        window.onload=function () {
            document.getElementById("update01").onclick=function (){
                let id1 = document.getElementById("id1").value;
                location = "/stu/tomod?id="+id1;
            }
            document.getElementById("update02").onclick=function (){
                let id2 = document.getElementById("id2").value;
                location = "/cou/tomod?id="+id2;
            }
        }
    </script>
    <style>
        div{
            background-color: #a8f5eb;
            margin-top: 50px;
            width: 200px;
            height: 100px;
            color: black;

        }
    </style>
</head>
<body>
<div id="div1">
<a th:href="@{/stu/queryall}">查询所有学生</a></br>
<a th:href="@{stu/toadd}">添加一个学生</a></br>
<a href="#" id="update01">修改一个学生</a>
<input type="text" id="id1">
</div>

<div id="div2">
<a th:href="@{/cou/queryall}">查询所有课程</a></br>
<a th:href="@{cou/toadd}">添加一个课程</a></br>
<a href="#" id="update02">修改一个课程</a>
<input type="text" id="id2">
</div>
</body>
</html>